using System.Runtime.InteropServices;

namespace MeiWinForms.tool;

public static partial class MeiFile
{
    [LibraryImport(@"tool\lib_mei_file.dll", StringMarshalling = StringMarshalling.Utf16)]
    [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])]
    // ReSharper disable once InconsistentNaming
    public static partial int sendFile([MarshalAs(UnmanagedType.LPStr)] string name, [MarshalAs(UnmanagedType.LPStr)] string host, int port);

    [LibraryImport(@"tool\lib_mei_file.dll", StringMarshalling = StringMarshalling.Utf16)]
    [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])]
    // ReSharper disable once InconsistentNaming
    public static partial int recvFile([MarshalAs(UnmanagedType.LPStr)] string name, [MarshalAs(UnmanagedType.LPStr)] string host, int port);
}